<div class="grid_3">
<form xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:py="http://genshi.edgewall.org/"
    id="${id}"
    name="${name}"
    action="${action}"
    method="${method}"
    class="${css_class}"
    py:attrs="attrs" >
    <div>
        <div py:for="field in ihidden_fields"
             py:with="error=error_for(field)"
             py:strip="True">
            <span py:replace="field.display(value_for(field), **args_for(field))" />
            <span py:if="show_children_errors and error and not field.show_error" 
                  class="fielderror" py:content="error" />
        </div>
    </div>

        <div py:for="i, field in enumerate(ifields)" 
            id="${field.id}.container"
            class="grid_3"
            py:with="required = [None,' required'][int(field.is_required)]; 
                     error = error_for(field);
                     label_text = field.label_text;
                     help_text = field.help_text;" >
            <div py:if="show_labels" class="grid_4 alpha">
                <label id="${field.id}.label" for="${field.id}" 
                       class="fieldlabel${required}" 
                       py:if="label_text" py:content="label_text" />
            </div>
            <div class="grid_3">
                ${field.display(value_for(field), **args_for(field))}
                <span class="fieldhelp" py:if="help_text" py:content="help_text" />
                <span py:if="show_children_errors and error and not field.show_error" 
                  class="fielderror" py:content="error" />
            </div>
        </div>
    <span py:if="error and not error.error_dict" class="fielderror" py:content="error" />
</form>
</div>
